<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: AssetsLibrary Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Compute Library
   &#160;<span id="projectnumber">17.10</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.xhtml"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li><a href="classes.xhtml"><span>Data&#160;Structure&#160;Index</span></a></li>
      <li><a href="inherits.xhtml"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.xhtml"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classarm__compute_1_1test_1_1_assets_library.xhtml','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">AssetsLibrary Class Reference<span class="mlabels"><span class="mlabel">final</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Factory class to create and fill tensors.  
 <a href="classarm__compute_1_1test_1_1_assets_library.xhtml#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_assets_library_8h_source.xhtml">AssetsLibrary.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:adb53338108890e6b7354e16a1e9ae716"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#adb53338108890e6b7354e16a1e9ae716">AssetsLibrary</a> (std::string <a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a9b67b266207227062c7a2961ef85293a">path</a>, std::random_device::result_type <a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a4035a1140831801ced5dfa1d9fe6988a">seed</a>)</td></tr>
<tr class="memdesc:adb53338108890e6b7354e16a1e9ae716"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialises the library with a <code>path</code> to the assets directory.  <a href="#adb53338108890e6b7354e16a1e9ae716">More...</a><br/></td></tr>
<tr class="separator:adb53338108890e6b7354e16a1e9ae716"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b67b266207227062c7a2961ef85293a"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a9b67b266207227062c7a2961ef85293a">path</a> () const </td></tr>
<tr class="memdesc:a9b67b266207227062c7a2961ef85293a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Path to assets directory used to initialise library.  <a href="#a9b67b266207227062c7a2961ef85293a">More...</a><br/></td></tr>
<tr class="separator:a9b67b266207227062c7a2961ef85293a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4035a1140831801ced5dfa1d9fe6988a"><td class="memItemLeft" align="right" valign="top">std::random_device::result_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a4035a1140831801ced5dfa1d9fe6988a">seed</a> () const </td></tr>
<tr class="memdesc:a4035a1140831801ced5dfa1d9fe6988a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Seed that is used to fill tensors with random values.  <a href="#a4035a1140831801ced5dfa1d9fe6988a">More...</a><br/></td></tr>
<tr class="separator:a4035a1140831801ced5dfa1d9fe6988a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc474b96886b5fd500460c7b25dc84fa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#acc474b96886b5fd500460c7b25dc84fa">get_image_shape</a> (const std::string &amp;name)</td></tr>
<tr class="memdesc:acc474b96886b5fd500460c7b25dc84fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides a tensor shape for the specified image.  <a href="#acc474b96886b5fd500460c7b25dc84fa">More...</a><br/></td></tr>
<tr class="separator:acc474b96886b5fd500460c7b25dc84fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a024fbe836c85d10afefc81cd2e51658e"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a024fbe836c85d10afefc81cd2e51658e">get</a> (const std::string &amp;name) const </td></tr>
<tr class="memdesc:a024fbe836c85d10afefc81cd2e51658e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides a contant raw tensor for the specified image.  <a href="#a024fbe836c85d10afefc81cd2e51658e">More...</a><br/></td></tr>
<tr class="separator:a024fbe836c85d10afefc81cd2e51658e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0cf1a79542c521b9f16d117b085c4d5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#aa0cf1a79542c521b9f16d117b085c4d5">get</a> (const std::string &amp;name)</td></tr>
<tr class="memdesc:aa0cf1a79542c521b9f16d117b085c4d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides a raw tensor for the specified image.  <a href="#aa0cf1a79542c521b9f16d117b085c4d5">More...</a><br/></td></tr>
<tr class="separator:aa0cf1a79542c521b9f16d117b085c4d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3675bd0074fa527b42c6516a37f8f232"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a3675bd0074fa527b42c6516a37f8f232">get</a> (const std::string &amp;name, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> data_type, int num_channels=1) const </td></tr>
<tr class="memdesc:a3675bd0074fa527b42c6516a37f8f232"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an uninitialised raw tensor with the given <code>data_type</code> and <code>num_channels</code>.  <a href="#a3675bd0074fa527b42c6516a37f8f232">More...</a><br/></td></tr>
<tr class="separator:a3675bd0074fa527b42c6516a37f8f232"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e77935822447adc6cdce586f276f97d"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a0e77935822447adc6cdce586f276f97d">get</a> (const std::string &amp;name, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58">Format</a> format) const </td></tr>
<tr class="memdesc:a0e77935822447adc6cdce586f276f97d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides a contant raw tensor for the specified image after it has been converted to <code>format</code>.  <a href="#a0e77935822447adc6cdce586f276f97d">More...</a><br/></td></tr>
<tr class="separator:a0e77935822447adc6cdce586f276f97d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab760ccaa18b95b99c73eb0e763f39ec2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#ab760ccaa18b95b99c73eb0e763f39ec2">get</a> (const std::string &amp;name, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58">Format</a> format)</td></tr>
<tr class="memdesc:ab760ccaa18b95b99c73eb0e763f39ec2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides a raw tensor for the specified image after it has been converted to <code>format</code>.  <a href="#ab760ccaa18b95b99c73eb0e763f39ec2">More...</a><br/></td></tr>
<tr class="separator:ab760ccaa18b95b99c73eb0e763f39ec2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11f5f1baaad31d1067564eccf599e90c"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a11f5f1baaad31d1067564eccf599e90c">get</a> (const std::string &amp;name, <a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455a">Channel</a> channel) const </td></tr>
<tr class="memdesc:a11f5f1baaad31d1067564eccf599e90c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides a contant raw tensor for the specified channel after it has been extracted form the given image.  <a href="#a11f5f1baaad31d1067564eccf599e90c">More...</a><br/></td></tr>
<tr class="separator:a11f5f1baaad31d1067564eccf599e90c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6f0ca724e534653925306023dbb88e7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#af6f0ca724e534653925306023dbb88e7">get</a> (const std::string &amp;name, <a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455a">Channel</a> channel)</td></tr>
<tr class="memdesc:af6f0ca724e534653925306023dbb88e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides a raw tensor for the specified channel after it has been extracted form the given image.  <a href="#af6f0ca724e534653925306023dbb88e7">More...</a><br/></td></tr>
<tr class="separator:af6f0ca724e534653925306023dbb88e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c511f7046a704b8352ea8a8bbf456fa"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a8c511f7046a704b8352ea8a8bbf456fa">get</a> (const std::string &amp;name, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58">Format</a> format, <a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455a">Channel</a> channel) const </td></tr>
<tr class="memdesc:a8c511f7046a704b8352ea8a8bbf456fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides a constant raw tensor for the specified channel after it has been extracted form the given image formatted to <code>format</code>.  <a href="#a8c511f7046a704b8352ea8a8bbf456fa">More...</a><br/></td></tr>
<tr class="separator:a8c511f7046a704b8352ea8a8bbf456fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6182f07b3eda32931598aa4f2bfc11a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#ad6182f07b3eda32931598aa4f2bfc11a">get</a> (const std::string &amp;name, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58">Format</a> format, <a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455a">Channel</a> channel)</td></tr>
<tr class="memdesc:ad6182f07b3eda32931598aa4f2bfc11a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides a raw tensor for the specified channel after it has been extracted form the given image formatted to <code>format</code>.  <a href="#ad6182f07b3eda32931598aa4f2bfc11a">More...</a><br/></td></tr>
<tr class="separator:ad6182f07b3eda32931598aa4f2bfc11a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a6d9b68649fb7444ca36b5c651dfdda"><td class="memTemplParams" colspan="2">template&lt;typename T , typename D &gt; </td></tr>
<tr class="memitem:a9a6d9b68649fb7444ca36b5c651dfdda"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a9a6d9b68649fb7444ca36b5c651dfdda">fill_borders_with_garbage</a> (T &amp;&amp;tensor, D &amp;&amp;distribution, std::random_device::result_type seed_offset) const </td></tr>
<tr class="memdesc:a9a6d9b68649fb7444ca36b5c651dfdda"><td class="mdescLeft">&#160;</td><td class="mdescRight">Puts garbage values all around the tensor for testing purposes.  <a href="#a9a6d9b68649fb7444ca36b5c651dfdda">More...</a><br/></td></tr>
<tr class="separator:a9a6d9b68649fb7444ca36b5c651dfdda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80a7b5ae084bf22b91bc5f68a06711c0"><td class="memTemplParams" colspan="2">template&lt;typename T , typename D &gt; </td></tr>
<tr class="memitem:a80a7b5ae084bf22b91bc5f68a06711c0"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a> (T &amp;&amp;tensor, D &amp;&amp;distribution, std::random_device::result_type seed_offset) const </td></tr>
<tr class="memdesc:a80a7b5ae084bf22b91bc5f68a06711c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills the specified <code>tensor</code> with random values drawn from <code>distribution</code>.  <a href="#a80a7b5ae084bf22b91bc5f68a06711c0">More...</a><br/></td></tr>
<tr class="separator:a80a7b5ae084bf22b91bc5f68a06711c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a935d861fcffb0099b001498c494daaf6"><td class="memTemplParams" colspan="2">template&lt;typename D &gt; </td></tr>
<tr class="memitem:a935d861fcffb0099b001498c494daaf6"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a935d861fcffb0099b001498c494daaf6">fill</a> (<a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> &amp;raw, D &amp;&amp;distribution, std::random_device::result_type seed_offset) const </td></tr>
<tr class="memdesc:a935d861fcffb0099b001498c494daaf6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills the specified <code>raw</code> tensor with random values drawn from <code>distribution</code>.  <a href="#a935d861fcffb0099b001498c494daaf6">More...</a><br/></td></tr>
<tr class="separator:a935d861fcffb0099b001498c494daaf6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ee4fc10b84f941236df524f618b96c6"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a5ee4fc10b84f941236df524f618b96c6"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a5ee4fc10b84f941236df524f618b96c6">fill</a> (T &amp;&amp;tensor, const std::string &amp;name, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58">Format</a> format) const </td></tr>
<tr class="memdesc:a5ee4fc10b84f941236df524f618b96c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills the specified <code>tensor</code> with the content of the specified image converted to the given format.  <a href="#a5ee4fc10b84f941236df524f618b96c6">More...</a><br/></td></tr>
<tr class="separator:a5ee4fc10b84f941236df524f618b96c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56f49b809537f3564de1eb7703c4dfab"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a56f49b809537f3564de1eb7703c4dfab">fill</a> (<a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> &amp;raw, const std::string &amp;name, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58">Format</a> format) const </td></tr>
<tr class="memdesc:a56f49b809537f3564de1eb7703c4dfab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills the raw tensor with the content of the specified image converted to the given format.  <a href="#a56f49b809537f3564de1eb7703c4dfab">More...</a><br/></td></tr>
<tr class="separator:a56f49b809537f3564de1eb7703c4dfab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d049b9a5aba1f30b51f4bd36c3db076"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a4d049b9a5aba1f30b51f4bd36c3db076"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a4d049b9a5aba1f30b51f4bd36c3db076">fill</a> (T &amp;&amp;tensor, const std::string &amp;name, <a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455a">Channel</a> channel) const </td></tr>
<tr class="memdesc:a4d049b9a5aba1f30b51f4bd36c3db076"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills the specified <code>tensor</code> with the content of the specified channel extracted from the given image.  <a href="#a4d049b9a5aba1f30b51f4bd36c3db076">More...</a><br/></td></tr>
<tr class="separator:a4d049b9a5aba1f30b51f4bd36c3db076"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fca830911339dca1cefcd78763063cf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a8fca830911339dca1cefcd78763063cf">fill</a> (<a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> &amp;raw, const std::string &amp;name, <a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455a">Channel</a> channel) const </td></tr>
<tr class="memdesc:a8fca830911339dca1cefcd78763063cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills the raw tensor with the content of the specified channel extracted from the given image.  <a href="#a8fca830911339dca1cefcd78763063cf">More...</a><br/></td></tr>
<tr class="separator:a8fca830911339dca1cefcd78763063cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36a9ddc6792949fb561cd788e6e31208"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a36a9ddc6792949fb561cd788e6e31208"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a36a9ddc6792949fb561cd788e6e31208">fill</a> (T &amp;&amp;tensor, const std::string &amp;name, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58">Format</a> format, <a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455a">Channel</a> channel) const </td></tr>
<tr class="memdesc:a36a9ddc6792949fb561cd788e6e31208"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills the specified <code>tensor</code> with the content of the specified channel extracted from the given image after it has been converted to the given format.  <a href="#a36a9ddc6792949fb561cd788e6e31208">More...</a><br/></td></tr>
<tr class="separator:a36a9ddc6792949fb561cd788e6e31208"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32621ba3c7498c558f27e61606af85f4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a32621ba3c7498c558f27e61606af85f4">fill</a> (<a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> &amp;raw, const std::string &amp;name, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58">Format</a> format, <a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455a">Channel</a> channel) const </td></tr>
<tr class="memdesc:a32621ba3c7498c558f27e61606af85f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills the raw tensor with the content of the specified channel extracted from the given image after it has been converted to the given format.  <a href="#a32621ba3c7498c558f27e61606af85f4">More...</a><br/></td></tr>
<tr class="separator:a32621ba3c7498c558f27e61606af85f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb6f25295592e886976520216187eed7"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:abb6f25295592e886976520216187eed7"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#abb6f25295592e886976520216187eed7">fill_tensor_uniform</a> (T &amp;&amp;tensor, std::random_device::result_type seed_offset) const </td></tr>
<tr class="memdesc:abb6f25295592e886976520216187eed7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fill a tensor with uniform distribution across the range of its type.  <a href="#abb6f25295592e886976520216187eed7">More...</a><br/></td></tr>
<tr class="separator:abb6f25295592e886976520216187eed7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a150d2023c197e197f09f350ede795085"><td class="memTemplParams" colspan="2">template&lt;typename T , typename D &gt; </td></tr>
<tr class="memitem:a150d2023c197e197f09f350ede795085"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a150d2023c197e197f09f350ede795085">fill_tensor_uniform</a> (T &amp;&amp;tensor, std::random_device::result_type seed_offset, D low, D high) const </td></tr>
<tr class="memdesc:a150d2023c197e197f09f350ede795085"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fill a tensor with uniform distribution across the a specified range.  <a href="#a150d2023c197e197f09f350ede795085">More...</a><br/></td></tr>
<tr class="separator:a150d2023c197e197f09f350ede795085"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad85dc4c57a27c44d114c573b9a80bad6"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:ad85dc4c57a27c44d114c573b9a80bad6"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml#ad85dc4c57a27c44d114c573b9a80bad6">fill_layer_data</a> (T &amp;&amp;tensor, std::string name) const </td></tr>
<tr class="memdesc:ad85dc4c57a27c44d114c573b9a80bad6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills the specified <code>tensor</code> with data loaded from .npy (numpy binary) in specified path.  <a href="#ad85dc4c57a27c44d114c573b9a80bad6">More...</a><br/></td></tr>
<tr class="separator:ad85dc4c57a27c44d114c573b9a80bad6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Factory class to create and fill tensors. </p>
<p>Allows to initialise tensors from loaded images or by specifying the shape explicitly. Furthermore, provides methods to fill tensors with the content of loaded images or with random values. </p>

<p>Definition at line <a class="el" href="_assets_library_8h_source.xhtml#l00058">58</a> of file <a class="el" href="_assets_library_8h_source.xhtml">AssetsLibrary.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="adb53338108890e6b7354e16a1e9ae716"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml">AssetsLibrary</a> </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::random_device::result_type&#160;</td>
          <td class="paramname"><em>seed</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialises the library with a <code>path</code> to the assets directory. </p>
<p>Furthermore, sets the seed for the random generator to <code>seed</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>Path to load assets from. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">seed</td><td>Seed used to initialise the random number generator. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_assets_library_8cpp_source.xhtml#l00188">188</a> of file <a class="el" href="_assets_library_8cpp_source.xhtml">AssetsLibrary.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    : _library_path(std::move(<a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a9b67b266207227062c7a2961ef85293a">path</a>)),</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;      _seed{ <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a4035a1140831801ced5dfa1d9fe6988a">seed</a> }</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;{</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;}</div>
<div class="ttc" id="classarm__compute_1_1test_1_1_assets_library_xhtml_a4035a1140831801ced5dfa1d9fe6988a"><div class="ttname"><a href="classarm__compute_1_1test_1_1_assets_library.xhtml#a4035a1140831801ced5dfa1d9fe6988a">arm_compute::test::AssetsLibrary::seed</a></div><div class="ttdeci">std::random_device::result_type seed() const </div><div class="ttdoc">Seed that is used to fill tensors with random values. </div><div class="ttdef"><b>Definition:</b> <a href="_assets_library_8cpp_source.xhtml#l00199">AssetsLibrary.cpp:199</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1_assets_library_xhtml_a9b67b266207227062c7a2961ef85293a"><div class="ttname"><a href="classarm__compute_1_1test_1_1_assets_library.xhtml#a9b67b266207227062c7a2961ef85293a">arm_compute::test::AssetsLibrary::path</a></div><div class="ttdeci">std::string path() const </div><div class="ttdoc">Path to assets directory used to initialise library. </div><div class="ttdef"><b>Definition:</b> <a href="_assets_library_8cpp_source.xhtml#l00194">AssetsLibrary.cpp:194</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a80a7b5ae084bf22b91bc5f68a06711c0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fill </td>
          <td>(</td>
          <td class="paramtype">T &amp;&amp;&#160;</td>
          <td class="paramname"><em>tensor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">D &amp;&amp;&#160;</td>
          <td class="paramname"><em>distribution</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::random_device::result_type&#160;</td>
          <td class="paramname"><em>seed_offset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fills the specified <code>tensor</code> with random values drawn from <code>distribution</code>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">tensor</td><td>To be filled tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">distribution</td><td>Distribution used to fill the tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">seed_offset</td><td>The offset will be added to the global seed before initialising the random generator.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The <code>distribution</code> has to provide operator(Generator &amp;) which will be used to draw samples. </dd></dl>

<p>Definition at line <a class="el" href="_assets_library_8h_source.xhtml#l00403">403</a> of file <a class="el" href="_assets_library_8h_source.xhtml">AssetsLibrary.h</a>.</p>

<p>References <a class="el" href="_helpers_8inl_source.xhtml#l00127">arm_compute::execute_window_loop()</a>, <a class="el" href="_assets_library_8h_source.xhtml#l00377">AssetsLibrary::fill_borders_with_garbage()</a>, <a class="el" href="_window_8inl_source.xhtml#l00040">Window::set()</a>, <a class="el" href="tests_2_utils_8h_source.xhtml#l00224">arm_compute::test::store_value_with_data_type()</a>, and <a class="el" href="hwc_8hpp_source.xhtml#l00269">value</a>.</p>

<p>Referenced by <a class="el" href="_assets_library_8cpp_source.xhtml#l00210">AssetsLibrary::fill()</a>, and <a class="el" href="_assets_library_8h_source.xhtml#l00474">AssetsLibrary::fill_tensor_uniform()</a>.</p>
<div class="fragment"><div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;{</div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;    Window window;</div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> d = 0; d &lt; tensor.shape().num_dimensions(); ++d)</div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;    {</div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;        window.set(d, Window::Dimension(0, tensor.shape()[d], 1));</div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;    }</div>
<div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;</div>
<div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;    std::mt19937 gen(_seed + seed_offset);</div>
<div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;</div>
<div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;    <a class="code" href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">execute_window_loop</a>(window, [&amp;](<span class="keyword">const</span> Coordinates &amp; <span class="keywordtype">id</span>)</div>
<div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;    {</div>
<div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;        <span class="keyword">using</span> ResultType         = <span class="keyword">typename</span> std::remove_reference&lt;D&gt;::type::result_type;</div>
<div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;        <span class="keyword">const</span> ResultType <a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a>   = distribution(gen);</div>
<div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;        <span class="keywordtype">void</span> *<span class="keyword">const</span>      out_ptr = tensor(<span class="keywordtype">id</span>);</div>
<div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;        <a class="code" href="namespacearm__compute_1_1test.xhtml#a1e6934e95738573214c2ce1d6648d116">store_value_with_data_type</a>(out_ptr, value, tensor.data_type());</div>
<div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;    });</div>
<div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;</div>
<div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;    <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a9a6d9b68649fb7444ca36b5c651dfdda">fill_borders_with_garbage</a>(tensor, distribution, seed_offset);</div>
<div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;}</div>
<div class="ttc" id="classarm__compute_1_1test_1_1_assets_library_xhtml_a9a6d9b68649fb7444ca36b5c651dfdda"><div class="ttname"><a href="classarm__compute_1_1test_1_1_assets_library.xhtml#a9a6d9b68649fb7444ca36b5c651dfdda">arm_compute::test::AssetsLibrary::fill_borders_with_garbage</a></div><div class="ttdeci">void fill_borders_with_garbage(T &amp;&amp;tensor, D &amp;&amp;distribution, std::random_device::result_type seed_offset) const </div><div class="ttdoc">Puts garbage values all around the tensor for testing purposes. </div><div class="ttdef"><b>Definition:</b> <a href="_assets_library_8h_source.xhtml#l00377">AssetsLibrary.h:377</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a1e6934e95738573214c2ce1d6648d116"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a1e6934e95738573214c2ce1d6648d116">arm_compute::test::store_value_with_data_type</a></div><div class="ttdeci">void store_value_with_data_type(void *ptr, T value, DataType data_type)</div><div class="ttdoc">Write the value after casting the pointer according to data_type. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00224">Utils.h:224</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a6c0dcc38187027dcb89cd9724bc5a823"><div class="ttname"><a href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">arm_compute::execute_window_loop</a></div><div class="ttdeci">void execute_window_loop(const Window &amp;w, L &amp;&amp;lambda_function, Ts &amp;&amp;...iterators)</div><div class="ttdoc">Iterate through the passed window, automatically adjusting the iterators and calling the lambda_funct...</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00127">Helpers.inl:127</a></div></div>
<div class="ttc" id="hwc_8hpp_xhtml_a0f61d63b009d0880a89c843bd50d8d76"><div class="ttname"><a href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a></div><div class="ttdeci">void * value</div><div class="ttdef"><b>Definition:</b> <a href="hwc_8hpp_source.xhtml#l00269">hwc.hpp:269</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a935d861fcffb0099b001498c494daaf6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fill </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> &amp;&#160;</td>
          <td class="paramname"><em>raw</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">D &amp;&amp;&#160;</td>
          <td class="paramname"><em>distribution</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::random_device::result_type&#160;</td>
          <td class="paramname"><em>seed_offset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fills the specified <code>raw</code> tensor with random values drawn from <code>distribution</code>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">raw</td><td>To be filled raw. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">distribution</td><td>Distribution used to fill the tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">seed_offset</td><td>The offset will be added to the global seed before initialising the random generator.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The <code>distribution</code> has to provide operator(Generator &amp;) which will be used to draw samples. </dd></dl>

<p>Definition at line <a class="el" href="_assets_library_8h_source.xhtml#l00425">425</a> of file <a class="el" href="_assets_library_8h_source.xhtml">AssetsLibrary.h</a>.</p>

<p>References <a class="el" href="_simple_tensor_8h_source.xhtml#l00311">SimpleTensor&lt; T &gt;::data()</a>, <a class="el" href="_simple_tensor_8h_source.xhtml#l00265">SimpleTensor&lt; T &gt;::data_type()</a>, <a class="el" href="_simple_tensor_8h_source.xhtml#l00240">SimpleTensor&lt; T &gt;::element_size()</a>, <a class="el" href="helpers_8h_source.xhtml#l00295">offset()</a>, <a class="el" href="_simple_tensor_8h_source.xhtml#l00252">SimpleTensor&lt; T &gt;::size()</a>, <a class="el" href="tests_2_utils_8h_source.xhtml#l00224">arm_compute::test::store_value_with_data_type()</a>, and <a class="el" href="hwc_8hpp_source.xhtml#l00269">value</a>.</p>
<div class="fragment"><div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;{</div>
<div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;    std::mt19937 gen(_seed + seed_offset);</div>
<div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;</div>
<div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> <a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a> = 0; <a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a> &lt; raw.size(); <a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a> += raw.element_size())</div>
<div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;    {</div>
<div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;        <span class="keyword">using</span> ResultType       = <span class="keyword">typename</span> std::remove_reference&lt;D&gt;::type::result_type;</div>
<div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;        <span class="keyword">const</span> ResultType <a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a> = distribution(gen);</div>
<div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;        <a class="code" href="namespacearm__compute_1_1test.xhtml#a1e6934e95738573214c2ce1d6648d116">store_value_with_data_type</a>(raw.data() + <a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>, <a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a>, raw.data_type());</div>
<div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;    }</div>
<div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;}</div>
<div class="ttc" id="helpers_8h_xhtml_a009469e4d9b8fce3b6d5e97d2077827d"><div class="ttname"><a href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a></div><div class="ttdeci">__global uchar * offset(const Image *img, int x, int y)</div><div class="ttdoc">Get the pointer position of a Image. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00295">helpers.h:295</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a1e6934e95738573214c2ce1d6648d116"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a1e6934e95738573214c2ce1d6648d116">arm_compute::test::store_value_with_data_type</a></div><div class="ttdeci">void store_value_with_data_type(void *ptr, T value, DataType data_type)</div><div class="ttdoc">Write the value after casting the pointer according to data_type. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00224">Utils.h:224</a></div></div>
<div class="ttc" id="hwc_8hpp_xhtml_a0f61d63b009d0880a89c843bd50d8d76"><div class="ttname"><a href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a></div><div class="ttdeci">void * value</div><div class="ttdef"><b>Definition:</b> <a href="hwc_8hpp_source.xhtml#l00269">hwc.hpp:269</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a5ee4fc10b84f941236df524f618b96c6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fill </td>
          <td>(</td>
          <td class="paramtype">T &amp;&amp;&#160;</td>
          <td class="paramname"><em>tensor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58">Format</a>&#160;</td>
          <td class="paramname"><em>format</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fills the specified <code>tensor</code> with the content of the specified image converted to the given format. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">tensor</td><td>To be filled tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td><a class="el" href="struct_image.xhtml" title="Structure to hold Image information. ">Image</a> file used to fill the tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>Format of the image used to fill the tensor.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section warning"><dt>Warning</dt><dd>No check is performed that the specified format actually matches the format of the tensor. </dd></dl>

<p>Definition at line <a class="el" href="_assets_library_8h_source.xhtml#l00438">438</a> of file <a class="el" href="_assets_library_8h_source.xhtml">AssetsLibrary.h</a>.</p>

<p>References <a class="el" href="_simple_tensor_8h_source.xhtml#l00311">SimpleTensor&lt; T &gt;::data()</a>, <a class="el" href="_simple_tensor_8h_source.xhtml#l00240">SimpleTensor&lt; T &gt;::element_size()</a>, <a class="el" href="tests_2_utils_8h_source.xhtml#l00308">arm_compute::test::index2coord()</a>, <a class="el" href="helpers_8h_source.xhtml#l00295">offset()</a>, <a class="el" href="_simple_tensor_8h_source.xhtml#l00234">SimpleTensor&lt; T &gt;::shape()</a>, and <a class="el" href="_simple_tensor_8h_source.xhtml#l00252">SimpleTensor&lt; T &gt;::size()</a>.</p>
<div class="fragment"><div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;{</div>
<div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;    <span class="keyword">const</span> RawTensor &amp;raw = <span class="keyword">get</span>(name, format);</div>
<div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;</div>
<div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> <a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a> = 0; <a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a> &lt; raw.size(); <a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a> += raw.element_size())</div>
<div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;    {</div>
<div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;        <span class="keyword">const</span> Coordinates <span class="keywordtype">id</span> = <a class="code" href="namespacearm__compute_1_1test.xhtml#a24d8c0391cfa38e78969b6ad97c0ff09">index2coord</a>(raw.shape(), <a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a> / raw.element_size());</div>
<div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;</div>
<div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;        <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#afb9ded5f49336ae503bb9f2035ea902b">RawTensor::value_type</a> *<span class="keyword">const</span> raw_ptr = raw.data() + <a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>;</div>
<div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;        <span class="keyword">const</span> <span class="keyword">auto</span>                         out_ptr = <span class="keyword">static_cast&lt;</span><a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#afb9ded5f49336ae503bb9f2035ea902b">RawTensor::value_type</a> *<span class="keyword">&gt;</span>(tensor(<span class="keywordtype">id</span>));</div>
<div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;        std::copy_n(raw_ptr, raw.element_size(), out_ptr);</div>
<div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;    }</div>
<div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;}</div>
<div class="ttc" id="helpers_8h_xhtml_a009469e4d9b8fce3b6d5e97d2077827d"><div class="ttname"><a href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a></div><div class="ttdeci">__global uchar * offset(const Image *img, int x, int y)</div><div class="ttdoc">Get the pointer position of a Image. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00295">helpers.h:295</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1_simple_tensor_xhtml_afb9ded5f49336ae503bb9f2035ea902b"><div class="ttname"><a href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#afb9ded5f49336ae503bb9f2035ea902b">arm_compute::test::SimpleTensor&lt; uint8_t &gt;::value_type</a></div><div class="ttdeci">uint8_t value_type</div><div class="ttdef"><b>Definition:</b> <a href="_simple_tensor_8h_source.xhtml#l00096">SimpleTensor.h:96</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a24d8c0391cfa38e78969b6ad97c0ff09"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a24d8c0391cfa38e78969b6ad97c0ff09">arm_compute::test::index2coord</a></div><div class="ttdeci">Coordinates index2coord(const TensorShape &amp;shape, int index)</div><div class="ttdoc">Convert a linear index into n-dimensional coordinates. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00308">Utils.h:308</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a56f49b809537f3564de1eb7703c4dfab"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fill </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> &amp;&#160;</td>
          <td class="paramname"><em>raw</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58">Format</a>&#160;</td>
          <td class="paramname"><em>format</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fills the raw tensor with the content of the specified image converted to the given format. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">raw</td><td>To be filled raw tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td><a class="el" href="struct_image.xhtml" title="Structure to hold Image information. ">Image</a> file used to fill the tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>Format of the image used to fill the tensor.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section warning"><dt>Warning</dt><dd>No check is performed that the specified format actually matches the format of the tensor. </dd></dl>

<p>Definition at line <a class="el" href="_assets_library_8cpp_source.xhtml#l00204">204</a> of file <a class="el" href="_assets_library_8cpp_source.xhtml">AssetsLibrary.cpp</a>.</p>

<p>References <a class="el" href="_simple_tensor_8h_source.xhtml#l00311">SimpleTensor&lt; T &gt;::data()</a>, and <a class="el" href="_simple_tensor_8h_source.xhtml#l00252">SimpleTensor&lt; T &gt;::size()</a>.</p>
<div class="fragment"><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;{</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;    <span class="keyword">const</span> RawTensor &amp;src = <span class="keyword">get</span>(name, format);</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    std::copy_n(src.data(), raw.size(), raw.data());</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a4d049b9a5aba1f30b51f4bd36c3db076"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fill </td>
          <td>(</td>
          <td class="paramtype">T &amp;&amp;&#160;</td>
          <td class="paramname"><em>tensor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455a">Channel</a>&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fills the specified <code>tensor</code> with the content of the specified channel extracted from the given image. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">tensor</td><td>To be filled tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td><a class="el" href="struct_image.xhtml" title="Structure to hold Image information. ">Image</a> file used to fill the tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">channel</td><td>Channel of the image used to fill the tensor.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The channel has to be unambiguous so that the format can be inferred automatically.</dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>No check is performed that the specified format actually matches the format of the tensor. </dd></dl>

<p>Definition at line <a class="el" href="_assets_library_8h_source.xhtml#l00453">453</a> of file <a class="el" href="_assets_library_8h_source.xhtml">AssetsLibrary.h</a>.</p>

<p>References <a class="el" href="_assets_library_8h_source.xhtml#l00403">AssetsLibrary::fill()</a>, and <a class="el" href="tests_2_utils_8h_source.xhtml#l00119">arm_compute::test::get_format_for_channel()</a>.</p>
<div class="fragment"><div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;{</div>
<div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;    <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(std::forward&lt;T&gt;(tensor), name, <a class="code" href="namespacearm__compute_1_1test.xhtml#aa337ab76176f3c4193642ac6de3a61cf">get_format_for_channel</a>(channel), channel);</div>
<div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;}</div>
<div class="ttc" id="classarm__compute_1_1test_1_1_assets_library_xhtml_a80a7b5ae084bf22b91bc5f68a06711c0"><div class="ttname"><a href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">arm_compute::test::AssetsLibrary::fill</a></div><div class="ttdeci">void fill(T &amp;&amp;tensor, D &amp;&amp;distribution, std::random_device::result_type seed_offset) const </div><div class="ttdoc">Fills the specified tensor with random values drawn from distribution. </div><div class="ttdef"><b>Definition:</b> <a href="_assets_library_8h_source.xhtml#l00403">AssetsLibrary.h:403</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_aa337ab76176f3c4193642ac6de3a61cf"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#aa337ab76176f3c4193642ac6de3a61cf">arm_compute::test::get_format_for_channel</a></div><div class="ttdeci">Format get_format_for_channel(Channel channel)</div><div class="ttdoc">Look up the format corresponding to a channel. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00119">Utils.h:119</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a8fca830911339dca1cefcd78763063cf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fill </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> &amp;&#160;</td>
          <td class="paramname"><em>raw</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455a">Channel</a>&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fills the raw tensor with the content of the specified channel extracted from the given image. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">raw</td><td>To be filled raw tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td><a class="el" href="struct_image.xhtml" title="Structure to hold Image information. ">Image</a> file used to fill the tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">channel</td><td>Channel of the image used to fill the tensor.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The channel has to be unambiguous so that the format can be inferred automatically.</dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>No check is performed that the specified format actually matches the format of the tensor. </dd></dl>

<p>Definition at line <a class="el" href="_assets_library_8cpp_source.xhtml#l00210">210</a> of file <a class="el" href="_assets_library_8cpp_source.xhtml">AssetsLibrary.cpp</a>.</p>

<p>References <a class="el" href="_assets_library_8h_source.xhtml#l00403">AssetsLibrary::fill()</a>, and <a class="el" href="tests_2_utils_8h_source.xhtml#l00119">arm_compute::test::get_format_for_channel()</a>.</p>
<div class="fragment"><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;{</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(raw, name, <a class="code" href="namespacearm__compute_1_1test.xhtml#aa337ab76176f3c4193642ac6de3a61cf">get_format_for_channel</a>(channel), channel);</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;}</div>
<div class="ttc" id="classarm__compute_1_1test_1_1_assets_library_xhtml_a80a7b5ae084bf22b91bc5f68a06711c0"><div class="ttname"><a href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">arm_compute::test::AssetsLibrary::fill</a></div><div class="ttdeci">void fill(T &amp;&amp;tensor, D &amp;&amp;distribution, std::random_device::result_type seed_offset) const </div><div class="ttdoc">Fills the specified tensor with random values drawn from distribution. </div><div class="ttdef"><b>Definition:</b> <a href="_assets_library_8h_source.xhtml#l00403">AssetsLibrary.h:403</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_aa337ab76176f3c4193642ac6de3a61cf"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#aa337ab76176f3c4193642ac6de3a61cf">arm_compute::test::get_format_for_channel</a></div><div class="ttdeci">Format get_format_for_channel(Channel channel)</div><div class="ttdoc">Look up the format corresponding to a channel. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00119">Utils.h:119</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a36a9ddc6792949fb561cd788e6e31208"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fill </td>
          <td>(</td>
          <td class="paramtype">T &amp;&amp;&#160;</td>
          <td class="paramname"><em>tensor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58">Format</a>&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455a">Channel</a>&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fills the specified <code>tensor</code> with the content of the specified channel extracted from the given image after it has been converted to the given format. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">tensor</td><td>To be filled tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td><a class="el" href="struct_image.xhtml" title="Structure to hold Image information. ">Image</a> file used to fill the tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>Format of the image used to fill the tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">channel</td><td>Channel of the image used to fill the tensor.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section warning"><dt>Warning</dt><dd>No check is performed that the specified format actually matches the format of the tensor. </dd></dl>

<p>Definition at line <a class="el" href="_assets_library_8h_source.xhtml#l00459">459</a> of file <a class="el" href="_assets_library_8h_source.xhtml">AssetsLibrary.h</a>.</p>

<p>References <a class="el" href="_simple_tensor_8h_source.xhtml#l00311">SimpleTensor&lt; T &gt;::data()</a>, <a class="el" href="_simple_tensor_8h_source.xhtml#l00240">SimpleTensor&lt; T &gt;::element_size()</a>, <a class="el" href="tests_2_utils_8h_source.xhtml#l00308">arm_compute::test::index2coord()</a>, <a class="el" href="helpers_8h_source.xhtml#l00295">offset()</a>, <a class="el" href="_simple_tensor_8h_source.xhtml#l00234">SimpleTensor&lt; T &gt;::shape()</a>, and <a class="el" href="_simple_tensor_8h_source.xhtml#l00252">SimpleTensor&lt; T &gt;::size()</a>.</p>
<div class="fragment"><div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;{</div>
<div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;    <span class="keyword">const</span> RawTensor &amp;raw = <span class="keyword">get</span>(name, format, channel);</div>
<div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;</div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> <a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a> = 0; <a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a> &lt; raw.size(); <a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a> += raw.element_size())</div>
<div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;    {</div>
<div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;        <span class="keyword">const</span> Coordinates <span class="keywordtype">id</span> = <a class="code" href="namespacearm__compute_1_1test.xhtml#a24d8c0391cfa38e78969b6ad97c0ff09">index2coord</a>(raw.shape(), <a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a> / raw.element_size());</div>
<div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;</div>
<div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;        <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#afb9ded5f49336ae503bb9f2035ea902b">RawTensor::value_type</a> *<span class="keyword">const</span> raw_ptr = raw.data() + <a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>;</div>
<div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;        <span class="keyword">const</span> <span class="keyword">auto</span>                         out_ptr = <span class="keyword">static_cast&lt;</span><a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#afb9ded5f49336ae503bb9f2035ea902b">RawTensor::value_type</a> *<span class="keyword">&gt;</span>(tensor(<span class="keywordtype">id</span>));</div>
<div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;        std::copy_n(raw_ptr, raw.element_size(), out_ptr);</div>
<div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;    }</div>
<div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;}</div>
<div class="ttc" id="helpers_8h_xhtml_a009469e4d9b8fce3b6d5e97d2077827d"><div class="ttname"><a href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a></div><div class="ttdeci">__global uchar * offset(const Image *img, int x, int y)</div><div class="ttdoc">Get the pointer position of a Image. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00295">helpers.h:295</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1_simple_tensor_xhtml_afb9ded5f49336ae503bb9f2035ea902b"><div class="ttname"><a href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#afb9ded5f49336ae503bb9f2035ea902b">arm_compute::test::SimpleTensor&lt; uint8_t &gt;::value_type</a></div><div class="ttdeci">uint8_t value_type</div><div class="ttdef"><b>Definition:</b> <a href="_simple_tensor_8h_source.xhtml#l00096">SimpleTensor.h:96</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a24d8c0391cfa38e78969b6ad97c0ff09"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a24d8c0391cfa38e78969b6ad97c0ff09">arm_compute::test::index2coord</a></div><div class="ttdeci">Coordinates index2coord(const TensorShape &amp;shape, int index)</div><div class="ttdoc">Convert a linear index into n-dimensional coordinates. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00308">Utils.h:308</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a32621ba3c7498c558f27e61606af85f4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fill </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> &amp;&#160;</td>
          <td class="paramname"><em>raw</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58">Format</a>&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455a">Channel</a>&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fills the raw tensor with the content of the specified channel extracted from the given image after it has been converted to the given format. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">raw</td><td>To be filled raw tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td><a class="el" href="struct_image.xhtml" title="Structure to hold Image information. ">Image</a> file used to fill the tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>Format of the image used to fill the tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">channel</td><td>Channel of the image used to fill the tensor.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section warning"><dt>Warning</dt><dd>No check is performed that the specified format actually matches the format of the tensor. </dd></dl>

<p>Definition at line <a class="el" href="_assets_library_8cpp_source.xhtml#l00215">215</a> of file <a class="el" href="_assets_library_8cpp_source.xhtml">AssetsLibrary.cpp</a>.</p>

<p>References <a class="el" href="_simple_tensor_8h_source.xhtml#l00311">SimpleTensor&lt; T &gt;::data()</a>, and <a class="el" href="_simple_tensor_8h_source.xhtml#l00252">SimpleTensor&lt; T &gt;::size()</a>.</p>
<div class="fragment"><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;{</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;    <span class="keyword">const</span> RawTensor &amp;src = <span class="keyword">get</span>(name, format, channel);</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;    std::copy_n(src.data(), raw.size(), raw.data());</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a9a6d9b68649fb7444ca36b5c651dfdda"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fill_borders_with_garbage </td>
          <td>(</td>
          <td class="paramtype">T &amp;&amp;&#160;</td>
          <td class="paramname"><em>tensor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">D &amp;&amp;&#160;</td>
          <td class="paramname"><em>distribution</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::random_device::result_type&#160;</td>
          <td class="paramname"><em>seed_offset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Puts garbage values all around the tensor for testing purposes. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">tensor</td><td>To be filled tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">distribution</td><td>Distribution used to fill the tensor's surroundings. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">seed_offset</td><td>The offset will be added to the global seed before initialising the random generator. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_assets_library_8h_source.xhtml#l00377">377</a> of file <a class="el" href="_assets_library_8h_source.xhtml">AssetsLibrary.h</a>.</p>

<p>References <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l00202">BorderSize::bottom</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00127">arm_compute::execute_window_loop()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l00203">BorderSize::left</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l00201">BorderSize::right</a>, <a class="el" href="_window_8inl_source.xhtml#l00040">Window::set()</a>, <a class="el" href="_c_l_2_min_max_location_8cpp_source.xhtml#l00089">arm_compute::test::validation::shape</a>, <a class="el" href="tests_2_utils_8h_source.xhtml#l00224">arm_compute::test::store_value_with_data_type()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l00200">BorderSize::top</a>, <a class="el" href="hwc_8hpp_source.xhtml#l00269">value</a>, <a class="el" href="_dimensions_8h_source.xhtml#l00081">Dimensions&lt; T &gt;::x()</a>, and <a class="el" href="_dimensions_8h_source.xhtml#l00086">Dimensions&lt; T &gt;::y()</a>.</p>

<p>Referenced by <a class="el" href="_assets_library_8h_source.xhtml#l00403">AssetsLibrary::fill()</a>.</p>
<div class="fragment"><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;{</div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;    <span class="keyword">const</span> <a class="code" href="namespacearm__compute.xhtml#a4467b302fc9ec312c40580336ab783da">PaddingSize</a> padding_size = tensor.padding();</div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;</div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;    Window window;</div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;    window.set(0, Window::Dimension(-padding_size.left, tensor.shape()[0] + padding_size.right, 1));</div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;    window.set(1, Window::Dimension(-padding_size.top, tensor.shape()[1] + padding_size.bottom, 1));</div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;</div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;    std::mt19937 gen(_seed);</div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;</div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;    <a class="code" href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">execute_window_loop</a>(window, [&amp;](<span class="keyword">const</span> Coordinates &amp; <span class="keywordtype">id</span>)</div>
<div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;    {</div>
<div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;        TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a45cde9abb508c62d67c3bb2b9bf566a5">shape</a> = tensor.shape();</div>
<div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;</div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;        <span class="comment">// If outside of valid region</span></div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;        <span class="keywordflow">if</span>(<span class="keywordtype">id</span>.x() &lt; 0 || <span class="keywordtype">id</span>.x() &gt;= static_cast&lt;int&gt;(shape.x()) || <span class="keywordtype">id</span>.y() &lt; 0 || <span class="keywordtype">id</span>.y() &gt;= <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(shape.y()))</div>
<div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;        {</div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;            <span class="keyword">using</span> ResultType         = <span class="keyword">typename</span> std::remove_reference&lt;D&gt;::type::result_type;</div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;            <span class="keyword">const</span> ResultType <a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a>   = distribution(gen);</div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;            <span class="keywordtype">void</span> *<span class="keyword">const</span>      out_ptr = tensor(<span class="keywordtype">id</span>);</div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;            <a class="code" href="namespacearm__compute_1_1test.xhtml#a1e6934e95738573214c2ce1d6648d116">store_value_with_data_type</a>(out_ptr, value, tensor.data_type());</div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;        }</div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;    });</div>
<div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;}</div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a45cde9abb508c62d67c3bb2b9bf566a5"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a45cde9abb508c62d67c3bb2b9bf566a5">arm_compute::test::validation::shape</a></div><div class="ttdeci">shape</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_min_max_location_8cpp_source.xhtml#l00089">MinMaxLocation.cpp:89</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a1e6934e95738573214c2ce1d6648d116"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a1e6934e95738573214c2ce1d6648d116">arm_compute::test::store_value_with_data_type</a></div><div class="ttdeci">void store_value_with_data_type(void *ptr, T value, DataType data_type)</div><div class="ttdoc">Write the value after casting the pointer according to data_type. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00224">Utils.h:224</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a6c0dcc38187027dcb89cd9724bc5a823"><div class="ttname"><a href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">arm_compute::execute_window_loop</a></div><div class="ttdeci">void execute_window_loop(const Window &amp;w, L &amp;&amp;lambda_function, Ts &amp;&amp;...iterators)</div><div class="ttdoc">Iterate through the passed window, automatically adjusting the iterators and calling the lambda_funct...</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00127">Helpers.inl:127</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a4467b302fc9ec312c40580336ab783da"><div class="ttname"><a href="namespacearm__compute.xhtml#a4467b302fc9ec312c40580336ab783da">arm_compute::PaddingSize</a></div><div class="ttdeci">BorderSize PaddingSize</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00206">Types.h:206</a></div></div>
<div class="ttc" id="hwc_8hpp_xhtml_a0f61d63b009d0880a89c843bd50d8d76"><div class="ttname"><a href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a></div><div class="ttdeci">void * value</div><div class="ttdef"><b>Definition:</b> <a href="hwc_8hpp_source.xhtml#l00269">hwc.hpp:269</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ad85dc4c57a27c44d114c573b9a80bad6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fill_layer_data </td>
          <td>(</td>
          <td class="paramtype">T &amp;&amp;&#160;</td>
          <td class="paramname"><em>tensor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fills the specified <code>tensor</code> with data loaded from .npy (numpy binary) in specified path. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">tensor</td><td>To be filled tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>Data file.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The numpy array stored in the binary .npy file must be row-major in the sense that it must store elements within a row consecutively in the memory, then rows within a 2D slice, then 2D slices within a 3D slice and so on. Note that it imposes no restrictions on what indexing convention is used in the numpy array. That is, the numpy array can be either fortran style or C style as long as it adheres to the rule above.</dd></dl>
<p>More concretely, the orders of dimensions for each style are as follows: C-style (numpy default): array[HigherDims..., Z, Y, X] Fortran style: array[X, Y, Z, HigherDims...] </p>

<p>Definition at line <a class="el" href="_assets_library_8h_source.xhtml#l00656">656</a> of file <a class="el" href="_assets_library_8h_source.xhtml">AssetsLibrary.h</a>.</p>

<p>References <a class="el" href="_error_8h_source.xhtml#l00031">ARM_COMPUTE_ERROR</a>, <a class="el" href="_error_8h_source.xhtml#l00115">ARM_COMPUTE_ERROR_ON_MSG</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00127">arm_compute::execute_window_loop()</a>, <a class="el" href="tests_2_utils_8h_source.xhtml#l00445">arm_compute::test::get_typestring()</a>, <a class="el" href="hwc_8hpp_source.xhtml#l00261">header</a>, <a class="el" href="_assets_library_8cpp_source.xhtml#l00194">AssetsLibrary::path()</a>, <a class="el" href="_c_l_2_min_max_location_8cpp_source.xhtml#l00089">arm_compute::test::validation::shape</a>, and <a class="el" href="_window_8inl_source.xhtml#l00204">Window::use_tensor_dimensions()</a>.</p>
<div class="fragment"><div class="line"><a name="l00657"></a><span class="lineno">  657</span>&#160;{</div>
<div class="line"><a name="l00658"></a><span class="lineno">  658</span>&#160;<span class="preprocessor">#ifdef _WIN32</span></div>
<div class="line"><a name="l00659"></a><span class="lineno">  659</span>&#160;<span class="preprocessor"></span>    <span class="keyword">const</span> std::string path_separator(<span class="stringliteral">&quot;\\&quot;</span>);</div>
<div class="line"><a name="l00660"></a><span class="lineno">  660</span>&#160;<span class="preprocessor">#else  </span><span class="comment">/* _WIN32 */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00661"></a><span class="lineno">  661</span>&#160;<span class="preprocessor"></span>    <span class="keyword">const</span> std::string path_separator(<span class="stringliteral">&quot;/&quot;</span>);</div>
<div class="line"><a name="l00662"></a><span class="lineno">  662</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* _WIN32 */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00663"></a><span class="lineno">  663</span>&#160;<span class="preprocessor"></span>    <span class="keyword">const</span> std::string <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a9b67b266207227062c7a2961ef85293a">path</a> = _library_path + path_separator + name;</div>
<div class="line"><a name="l00664"></a><span class="lineno">  664</span>&#160;</div>
<div class="line"><a name="l00665"></a><span class="lineno">  665</span>&#160;    std::vector&lt;unsigned long&gt; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a45cde9abb508c62d67c3bb2b9bf566a5">shape</a>;</div>
<div class="line"><a name="l00666"></a><span class="lineno">  666</span>&#160;</div>
<div class="line"><a name="l00667"></a><span class="lineno">  667</span>&#160;    <span class="comment">// Open file</span></div>
<div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160;    std::ifstream stream(path, std::ios::in | std::ios::binary);</div>
<div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160;    <span class="keywordflow">if</span>(!stream.good())</div>
<div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;    {</div>
<div class="line"><a name="l00671"></a><span class="lineno">  671</span>&#160;        <span class="keywordflow">throw</span> framework::FileNotFound(<span class="stringliteral">&quot;Could not load npy file: &quot;</span> + path);</div>
<div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160;    }</div>
<div class="line"><a name="l00673"></a><span class="lineno">  673</span>&#160;    <span class="comment">// Check magic bytes and version number</span></div>
<div class="line"><a name="l00674"></a><span class="lineno">  674</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> v_major = 0;</div>
<div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> v_minor = 0;</div>
<div class="line"><a name="l00676"></a><span class="lineno">  676</span>&#160;    npy::read_magic(stream, &amp;v_major, &amp;v_minor);</div>
<div class="line"><a name="l00677"></a><span class="lineno">  677</span>&#160;</div>
<div class="line"><a name="l00678"></a><span class="lineno">  678</span>&#160;    <span class="comment">// Read header</span></div>
<div class="line"><a name="l00679"></a><span class="lineno">  679</span>&#160;    std::string <a class="code" href="hwc_8hpp.xhtml#a9d9174de5edba1e56fbfd90dc5e60f75">header</a>;</div>
<div class="line"><a name="l00680"></a><span class="lineno">  680</span>&#160;    <span class="keywordflow">if</span>(v_major == 1 &amp;&amp; v_minor == 0)</div>
<div class="line"><a name="l00681"></a><span class="lineno">  681</span>&#160;    {</div>
<div class="line"><a name="l00682"></a><span class="lineno">  682</span>&#160;        header = npy::read_header_1_0(stream);</div>
<div class="line"><a name="l00683"></a><span class="lineno">  683</span>&#160;    }</div>
<div class="line"><a name="l00684"></a><span class="lineno">  684</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span>(v_major == 2 &amp;&amp; v_minor == 0)</div>
<div class="line"><a name="l00685"></a><span class="lineno">  685</span>&#160;    {</div>
<div class="line"><a name="l00686"></a><span class="lineno">  686</span>&#160;        header = npy::read_header_2_0(stream);</div>
<div class="line"><a name="l00687"></a><span class="lineno">  687</span>&#160;    }</div>
<div class="line"><a name="l00688"></a><span class="lineno">  688</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00689"></a><span class="lineno">  689</span>&#160;    {</div>
<div class="line"><a name="l00690"></a><span class="lineno">  690</span>&#160;        <a class="code" href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;Unsupported file format version&quot;</span>);</div>
<div class="line"><a name="l00691"></a><span class="lineno">  691</span>&#160;    }</div>
<div class="line"><a name="l00692"></a><span class="lineno">  692</span>&#160;</div>
<div class="line"><a name="l00693"></a><span class="lineno">  693</span>&#160;    <span class="comment">// Parse header</span></div>
<div class="line"><a name="l00694"></a><span class="lineno">  694</span>&#160;    <span class="keywordtype">bool</span>        fortran_order = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00695"></a><span class="lineno">  695</span>&#160;    std::string typestr;</div>
<div class="line"><a name="l00696"></a><span class="lineno">  696</span>&#160;    npy::ParseHeader(header, typestr, &amp;fortran_order, shape);</div>
<div class="line"><a name="l00697"></a><span class="lineno">  697</span>&#160;</div>
<div class="line"><a name="l00698"></a><span class="lineno">  698</span>&#160;    <span class="comment">// Check if the typestring matches the given one</span></div>
<div class="line"><a name="l00699"></a><span class="lineno">  699</span>&#160;    std::string expect_typestr = <a class="code" href="namespacearm__compute_1_1test.xhtml#ae47155d6186155ec4da9295764b3c05a">get_typestring</a>(tensor.data_type());</div>
<div class="line"><a name="l00700"></a><span class="lineno">  700</span>&#160;    <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(typestr != expect_typestr, <span class="stringliteral">&quot;Typestrings mismatch&quot;</span>);</div>
<div class="line"><a name="l00701"></a><span class="lineno">  701</span>&#160;</div>
<div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;    <span class="comment">// Validate tensor shape</span></div>
<div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160;    <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(shape.size() != tensor.shape().num_dimensions(), <span class="stringliteral">&quot;Tensor ranks mismatch&quot;</span>);</div>
<div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160;    <span class="keywordflow">if</span>(fortran_order)</div>
<div class="line"><a name="l00705"></a><span class="lineno">  705</span>&#160;    {</div>
<div class="line"><a name="l00706"></a><span class="lineno">  706</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i = 0; i &lt; shape.size(); ++i)</div>
<div class="line"><a name="l00707"></a><span class="lineno">  707</span>&#160;        {</div>
<div class="line"><a name="l00708"></a><span class="lineno">  708</span>&#160;            <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(tensor.shape()[i] != shape[i], <span class="stringliteral">&quot;Tensor dimensions mismatch&quot;</span>);</div>
<div class="line"><a name="l00709"></a><span class="lineno">  709</span>&#160;        }</div>
<div class="line"><a name="l00710"></a><span class="lineno">  710</span>&#160;    }</div>
<div class="line"><a name="l00711"></a><span class="lineno">  711</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00712"></a><span class="lineno">  712</span>&#160;    {</div>
<div class="line"><a name="l00713"></a><span class="lineno">  713</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i = 0; i &lt; shape.size(); ++i)</div>
<div class="line"><a name="l00714"></a><span class="lineno">  714</span>&#160;        {</div>
<div class="line"><a name="l00715"></a><span class="lineno">  715</span>&#160;            <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(tensor.shape()[i] != shape[shape.size() - i - 1], <span class="stringliteral">&quot;Tensor dimensions mismatch&quot;</span>);</div>
<div class="line"><a name="l00716"></a><span class="lineno">  716</span>&#160;        }</div>
<div class="line"><a name="l00717"></a><span class="lineno">  717</span>&#160;    }</div>
<div class="line"><a name="l00718"></a><span class="lineno">  718</span>&#160;</div>
<div class="line"><a name="l00719"></a><span class="lineno">  719</span>&#160;    <span class="comment">// Read data</span></div>
<div class="line"><a name="l00720"></a><span class="lineno">  720</span>&#160;    <span class="keywordflow">if</span>(tensor.padding().empty())</div>
<div class="line"><a name="l00721"></a><span class="lineno">  721</span>&#160;    {</div>
<div class="line"><a name="l00722"></a><span class="lineno">  722</span>&#160;        <span class="comment">// If tensor has no padding read directly from stream.</span></div>
<div class="line"><a name="l00723"></a><span class="lineno">  723</span>&#160;        stream.read(reinterpret_cast&lt;char *&gt;(tensor.data()), tensor.size());</div>
<div class="line"><a name="l00724"></a><span class="lineno">  724</span>&#160;    }</div>
<div class="line"><a name="l00725"></a><span class="lineno">  725</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00726"></a><span class="lineno">  726</span>&#160;    {</div>
<div class="line"><a name="l00727"></a><span class="lineno">  727</span>&#160;        <span class="comment">// If tensor has padding accessing tensor elements through execution window.</span></div>
<div class="line"><a name="l00728"></a><span class="lineno">  728</span>&#160;        Window window;</div>
<div class="line"><a name="l00729"></a><span class="lineno">  729</span>&#160;        window.use_tensor_dimensions(tensor.shape());</div>
<div class="line"><a name="l00730"></a><span class="lineno">  730</span>&#160;</div>
<div class="line"><a name="l00731"></a><span class="lineno">  731</span>&#160;        <a class="code" href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">execute_window_loop</a>(window, [&amp;](<span class="keyword">const</span> Coordinates &amp; <span class="keywordtype">id</span>)</div>
<div class="line"><a name="l00732"></a><span class="lineno">  732</span>&#160;        {</div>
<div class="line"><a name="l00733"></a><span class="lineno">  733</span>&#160;            stream.read(reinterpret_cast&lt;char *&gt;(tensor(<span class="keywordtype">id</span>)), tensor.element_size());</div>
<div class="line"><a name="l00734"></a><span class="lineno">  734</span>&#160;        });</div>
<div class="line"><a name="l00735"></a><span class="lineno">  735</span>&#160;    }</div>
<div class="line"><a name="l00736"></a><span class="lineno">  736</span>&#160;}</div>
<div class="ttc" id="_error_8h_xhtml_a05b19c75afe9c24200a62b9724734bbd"><div class="ttname"><a href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR(...)</div><div class="ttdoc">Print the given message then throw an std::runtime_error. </div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00031">Error.h:31</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a45cde9abb508c62d67c3bb2b9bf566a5"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a45cde9abb508c62d67c3bb2b9bf566a5">arm_compute::test::validation::shape</a></div><div class="ttdeci">shape</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_min_max_location_8cpp_source.xhtml#l00089">MinMaxLocation.cpp:89</a></div></div>
<div class="ttc" id="hwc_8hpp_xhtml_a9d9174de5edba1e56fbfd90dc5e60f75"><div class="ttname"><a href="hwc_8hpp.xhtml#a9d9174de5edba1e56fbfd90dc5e60f75">header</a></div><div class="ttdeci">union kbase_uk_hwcnt_header header</div><div class="ttdef"><b>Definition:</b> <a href="hwc_8hpp_source.xhtml#l00261">hwc.hpp:261</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1_assets_library_xhtml_a9b67b266207227062c7a2961ef85293a"><div class="ttname"><a href="classarm__compute_1_1test_1_1_assets_library.xhtml#a9b67b266207227062c7a2961ef85293a">arm_compute::test::AssetsLibrary::path</a></div><div class="ttdeci">std::string path() const </div><div class="ttdoc">Path to assets directory used to initialise library. </div><div class="ttdef"><b>Definition:</b> <a href="_assets_library_8cpp_source.xhtml#l00194">AssetsLibrary.cpp:194</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a6c0dcc38187027dcb89cd9724bc5a823"><div class="ttname"><a href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">arm_compute::execute_window_loop</a></div><div class="ttdeci">void execute_window_loop(const Window &amp;w, L &amp;&amp;lambda_function, Ts &amp;&amp;...iterators)</div><div class="ttdoc">Iterate through the passed window, automatically adjusting the iterators and calling the lambda_funct...</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00127">Helpers.inl:127</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_ae47155d6186155ec4da9295764b3c05a"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#ae47155d6186155ec4da9295764b3c05a">arm_compute::test::get_typestring</a></div><div class="ttdeci">std::string get_typestring(DataType data_type)</div><div class="ttdoc">Obtain numpy type string from DataType. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00445">Utils.h:445</a></div></div>
<div class="ttc" id="_error_8h_xhtml_a5bbdcf574d3f5e412fa6a1117911e67b"><div class="ttname"><a href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_MSG(cond,...)</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00115">Error.h:115</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="abb6f25295592e886976520216187eed7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fill_tensor_uniform </td>
          <td>(</td>
          <td class="paramtype">T &amp;&amp;&#160;</td>
          <td class="paramname"><em>tensor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::random_device::result_type&#160;</td>
          <td class="paramname"><em>seed_offset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fill a tensor with uniform distribution across the range of its type. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">tensor</td><td>To be filled tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">seed_offset</td><td>The offset will be added to the global seed before initialising the random generator. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_assets_library_8h_source.xhtml#l00474">474</a> of file <a class="el" href="_assets_library_8h_source.xhtml">AssetsLibrary.h</a>.</p>

<p>References <a class="el" href="_error_8h_source.xhtml#l00031">ARM_COMPUTE_ERROR</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a56d8353718e6fdc78b8d69078a2cdb94">arm_compute::F16</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::F32</a>, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a1ad5f6f3069070ec4cbbdc94d5e61e0e">arm_compute::F64</a>, <a class="el" href="_assets_library_8h_source.xhtml#l00403">AssetsLibrary::fill()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00889">arm_compute::test::fixed_point_arithmetic::detail::max()</a>, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a48d877702a2957f5a932c43a357866f9">arm_compute::QS16</a>, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543">arm_compute::QS8</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c">arm_compute::S16</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aa1e28eee0339658d39a8b4d325b56e9c">arm_compute::S32</a>, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a115dca124dc6423c7a400b8a8a0270cc">arm_compute::S64</a>, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6aafb0fced528eaac5fe170b763cda5975">arm_compute::S8</a>, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6abd7ef6d4f35bc7d05c559b65032f15d1">arm_compute::SIZET</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aef9ef3ebca4d2b64b6ec83808bafa5f2">arm_compute::U16</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58ac8bd5bedff8ef192d39a962afc0e19ee">arm_compute::U32</a>, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a31d65cccd6593e4101db93fb878abcaa">arm_compute::U64</a>, and <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::U8</a>.</p>
<div class="fragment"><div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;{</div>
<div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;    <span class="keywordflow">switch</span>(tensor.data_type())</div>
<div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;    {</div>
<div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>:</div>
<div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;        {</div>
<div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;            std::uniform_int_distribution&lt;uint8_t&gt; distribution_u8(std::numeric_limits&lt;uint8_t&gt;::lowest(), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits&lt;uint8_t&gt;::max</a>());</div>
<div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_u8, seed_offset);</div>
<div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;        }</div>
<div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6aafb0fced528eaac5fe170b763cda5975">DataType::S8</a>:</div>
<div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543">DataType::QS8</a>:</div>
<div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;        {</div>
<div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;            std::uniform_int_distribution&lt;int8_t&gt; distribution_s8(std::numeric_limits&lt;int8_t&gt;::lowest(), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits&lt;int8_t&gt;::max</a>());</div>
<div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_s8, seed_offset);</div>
<div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;        }</div>
<div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aef9ef3ebca4d2b64b6ec83808bafa5f2">DataType::U16</a>:</div>
<div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;        {</div>
<div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;            std::uniform_int_distribution&lt;uint16_t&gt; distribution_u16(std::numeric_limits&lt;uint16_t&gt;::lowest(), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits&lt;uint16_t&gt;::max</a>());</div>
<div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_u16, seed_offset);</div>
<div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;        }</div>
<div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c">DataType::S16</a>:</div>
<div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a48d877702a2957f5a932c43a357866f9">DataType::QS16</a>:</div>
<div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;        {</div>
<div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;            std::uniform_int_distribution&lt;int16_t&gt; distribution_s16(std::numeric_limits&lt;int16_t&gt;::lowest(), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits&lt;int16_t&gt;::max</a>());</div>
<div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_s16, seed_offset);</div>
<div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;        }</div>
<div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58ac8bd5bedff8ef192d39a962afc0e19ee">DataType::U32</a>:</div>
<div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;        {</div>
<div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;            std::uniform_int_distribution&lt;uint32_t&gt; distribution_u32(std::numeric_limits&lt;uint32_t&gt;::lowest(), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits&lt;uint32_t&gt;::max</a>());</div>
<div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_u32, seed_offset);</div>
<div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;        }</div>
<div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aa1e28eee0339658d39a8b4d325b56e9c">DataType::S32</a>:</div>
<div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;        {</div>
<div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;            std::uniform_int_distribution&lt;int32_t&gt; distribution_s32(std::numeric_limits&lt;int32_t&gt;::lowest(), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits&lt;int32_t&gt;::max</a>());</div>
<div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_s32, seed_offset);</div>
<div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;        }</div>
<div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a31d65cccd6593e4101db93fb878abcaa">DataType::U64</a>:</div>
<div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;        {</div>
<div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160;            std::uniform_int_distribution&lt;uint64_t&gt; distribution_u64(std::numeric_limits&lt;uint64_t&gt;::lowest(), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits&lt;uint64_t&gt;::max</a>());</div>
<div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_u64, seed_offset);</div>
<div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;        }</div>
<div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a115dca124dc6423c7a400b8a8a0270cc">DataType::S64</a>:</div>
<div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;        {</div>
<div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;            std::uniform_int_distribution&lt;int64_t&gt; distribution_s64(std::numeric_limits&lt;int64_t&gt;::lowest(), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits&lt;int64_t&gt;::max</a>());</div>
<div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_s64, seed_offset);</div>
<div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00527"></a><span class="lineno">  527</span>&#160;        }</div>
<div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a56d8353718e6fdc78b8d69078a2cdb94">DataType::F16</a>:</div>
<div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;        {</div>
<div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160;            <span class="comment">// It doesn&#39;t make sense to check [-inf, inf], so hard code it to a big number</span></div>
<div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160;            std::uniform_real_distribution&lt;float&gt; distribution_f16(-100.f, 100.f);</div>
<div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_f16, seed_offset);</div>
<div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;        }</div>
<div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">DataType::F32</a>:</div>
<div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160;        {</div>
<div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;            <span class="comment">// It doesn&#39;t make sense to check [-inf, inf], so hard code it to a big number</span></div>
<div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;            std::uniform_real_distribution&lt;float&gt; distribution_f32(-1000.f, 1000.f);</div>
<div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_f32, seed_offset);</div>
<div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;        }</div>
<div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a1ad5f6f3069070ec4cbbdc94d5e61e0e">DataType::F64</a>:</div>
<div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160;        {</div>
<div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;            <span class="comment">// It doesn&#39;t make sense to check [-inf, inf], so hard code it to a big number</span></div>
<div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;            std::uniform_real_distribution&lt;double&gt; distribution_f64(-1000.f, 1000.f);</div>
<div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_f64, seed_offset);</div>
<div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;        }</div>
<div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6abd7ef6d4f35bc7d05c559b65032f15d1">DataType::SIZET</a>:</div>
<div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;        {</div>
<div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160;            std::uniform_int_distribution&lt;size_t&gt; distribution_sizet(std::numeric_limits&lt;size_t&gt;::lowest(), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits&lt;size_t&gt;::max</a>());</div>
<div class="line"><a name="l00552"></a><span class="lineno">  552</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_sizet, seed_offset);</div>
<div class="line"><a name="l00553"></a><span class="lineno">  553</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00554"></a><span class="lineno">  554</span>&#160;        }</div>
<div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160;        <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l00556"></a><span class="lineno">  556</span>&#160;            <a class="code" href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;NOT SUPPORTED!&quot;</span>);</div>
<div class="line"><a name="l00557"></a><span class="lineno">  557</span>&#160;    }</div>
<div class="line"><a name="l00558"></a><span class="lineno">  558</span>&#160;}</div>
<div class="ttc" id="_error_8h_xhtml_a05b19c75afe9c24200a62b9724734bbd"><div class="ttname"><a href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR(...)</div><div class="ttdoc">Print the given message then throw an std::runtime_error. </div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00031">Error.h:31</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a48d877702a2957f5a932c43a357866f9"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a48d877702a2957f5a932c43a357866f9">arm_compute::DataType::QS16</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1_assets_library_xhtml_a80a7b5ae084bf22b91bc5f68a06711c0"><div class="ttname"><a href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">arm_compute::test::AssetsLibrary::fill</a></div><div class="ttdeci">void fill(T &amp;&amp;tensor, D &amp;&amp;distribution, std::random_device::result_type seed_offset) const </div><div class="ttdoc">Fills the specified tensor with random values drawn from distribution. </div><div class="ttdef"><b>Definition:</b> <a href="_assets_library_8h_source.xhtml#l00403">AssetsLibrary.h:403</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543">arm_compute::DataType::QS8</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::Format::U8</a></div><div class="ttdoc">Unknown image format. </div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::Format::F32</a></div><div class="ttdoc">1 channel, 1 F16 per channel </div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58aef9ef3ebca4d2b64b6ec83808bafa5f2"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aef9ef3ebca4d2b64b6ec83808bafa5f2">arm_compute::Format::U16</a></div><div class="ttdoc">1 channel, 1 S16 per channel </div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a56d8353718e6fdc78b8d69078a2cdb94"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a56d8353718e6fdc78b8d69078a2cdb94">arm_compute::Format::F16</a></div><div class="ttdoc">1 channel, 1 U32 per channel </div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58aa1e28eee0339658d39a8b4d325b56e9c"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aa1e28eee0339658d39a8b4d325b56e9c">arm_compute::Format::S32</a></div><div class="ttdoc">1 channel, 1 U16 per channel </div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a115dca124dc6423c7a400b8a8a0270cc"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a115dca124dc6423c7a400b8a8a0270cc">arm_compute::DataType::S64</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6abd7ef6d4f35bc7d05c559b65032f15d1"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6abd7ef6d4f35bc7d05c559b65032f15d1">arm_compute::DataType::SIZET</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58ac8bd5bedff8ef192d39a962afc0e19ee"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58ac8bd5bedff8ef192d39a962afc0e19ee">arm_compute::Format::U32</a></div><div class="ttdoc">1 channel, 1 S32 per channel </div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c">arm_compute::Format::S16</a></div><div class="ttdoc">1 channel, 1 U8 per channel </div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ad91bb73431b4de1f4946ed949d444849"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">arm_compute::test::fixed_point_arithmetic::detail::max</a></div><div class="ttdeci">fixed_point&lt; T &gt; max(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00889">FixedPoint.h:889</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a1ad5f6f3069070ec4cbbdc94d5e61e0e"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a1ad5f6f3069070ec4cbbdc94d5e61e0e">arm_compute::DataType::F64</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a31d65cccd6593e4101db93fb878abcaa"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a31d65cccd6593e4101db93fb878abcaa">arm_compute::DataType::U64</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6aafb0fced528eaac5fe170b763cda5975"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6aafb0fced528eaac5fe170b763cda5975">arm_compute::DataType::S8</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a150d2023c197e197f09f350ede795085"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fill_tensor_uniform </td>
          <td>(</td>
          <td class="paramtype">T &amp;&amp;&#160;</td>
          <td class="paramname"><em>tensor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::random_device::result_type&#160;</td>
          <td class="paramname"><em>seed_offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">D&#160;</td>
          <td class="paramname"><em>low</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">D&#160;</td>
          <td class="paramname"><em>high</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fill a tensor with uniform distribution across the a specified range. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">tensor</td><td>To be filled tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">seed_offset</td><td>The offset will be added to the global seed before initialising the random generator. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">low</td><td>lowest value in the range (inclusive) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">high</td><td>highest value in the range (inclusive)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd><code>low</code> and <code>high</code> must be of the same type as the data type of <code>tensor</code> </dd></dl>

<p>Definition at line <a class="el" href="_assets_library_8h_source.xhtml#l00561">561</a> of file <a class="el" href="_assets_library_8h_source.xhtml">AssetsLibrary.h</a>.</p>

<p>References <a class="el" href="_error_8h_source.xhtml#l00031">ARM_COMPUTE_ERROR</a>, <a class="el" href="_error_8h_source.xhtml#l00124">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a56d8353718e6fdc78b8d69078a2cdb94">arm_compute::F16</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::F32</a>, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a1ad5f6f3069070ec4cbbdc94d5e61e0e">arm_compute::F64</a>, <a class="el" href="_assets_library_8h_source.xhtml#l00403">AssetsLibrary::fill()</a>, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a48d877702a2957f5a932c43a357866f9">arm_compute::QS16</a>, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543">arm_compute::QS8</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c">arm_compute::S16</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aa1e28eee0339658d39a8b4d325b56e9c">arm_compute::S32</a>, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a115dca124dc6423c7a400b8a8a0270cc">arm_compute::S64</a>, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6aafb0fced528eaac5fe170b763cda5975">arm_compute::S8</a>, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6abd7ef6d4f35bc7d05c559b65032f15d1">arm_compute::SIZET</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aef9ef3ebca4d2b64b6ec83808bafa5f2">arm_compute::U16</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58ac8bd5bedff8ef192d39a962afc0e19ee">arm_compute::U32</a>, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a31d65cccd6593e4101db93fb878abcaa">arm_compute::U64</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::U8</a>, and <a class="el" href="hwc_8hpp_source.xhtml#l00269">value</a>.</p>
<div class="fragment"><div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;{</div>
<div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160;    <span class="keywordflow">switch</span>(tensor.data_type())</div>
<div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160;    {</div>
<div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>:</div>
<div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;        {</div>
<div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;            <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(!(<a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">std::is_same&lt;uint8_t, D&gt;::value</a>));</div>
<div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;            std::uniform_int_distribution&lt;uint8_t&gt; distribution_u8(low, high);</div>
<div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_u8, seed_offset);</div>
<div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;        }</div>
<div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6aafb0fced528eaac5fe170b763cda5975">DataType::S8</a>:</div>
<div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543">DataType::QS8</a>:</div>
<div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;        {</div>
<div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;            <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(!(<a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">std::is_same&lt;int8_t, D&gt;::value</a>));</div>
<div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160;            std::uniform_int_distribution&lt;int8_t&gt; distribution_s8(low, high);</div>
<div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_s8, seed_offset);</div>
<div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00579"></a><span class="lineno">  579</span>&#160;        }</div>
<div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aef9ef3ebca4d2b64b6ec83808bafa5f2">DataType::U16</a>:</div>
<div class="line"><a name="l00581"></a><span class="lineno">  581</span>&#160;        {</div>
<div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;            <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(!(<a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">std::is_same&lt;uint16_t, D&gt;::value</a>));</div>
<div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;            std::uniform_int_distribution&lt;uint16_t&gt; distribution_u16(low, high);</div>
<div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_u16, seed_offset);</div>
<div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;        }</div>
<div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c">DataType::S16</a>:</div>
<div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a48d877702a2957f5a932c43a357866f9">DataType::QS16</a>:</div>
<div class="line"><a name="l00589"></a><span class="lineno">  589</span>&#160;        {</div>
<div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;            <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(!(<a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">std::is_same&lt;int16_t, D&gt;::value</a>));</div>
<div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;            std::uniform_int_distribution&lt;int16_t&gt; distribution_s16(low, high);</div>
<div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_s16, seed_offset);</div>
<div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;        }</div>
<div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58ac8bd5bedff8ef192d39a962afc0e19ee">DataType::U32</a>:</div>
<div class="line"><a name="l00596"></a><span class="lineno">  596</span>&#160;        {</div>
<div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160;            <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(!(<a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">std::is_same&lt;uint32_t, D&gt;::value</a>));</div>
<div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160;            std::uniform_int_distribution&lt;uint32_t&gt; distribution_u32(low, high);</div>
<div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_u32, seed_offset);</div>
<div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160;        }</div>
<div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aa1e28eee0339658d39a8b4d325b56e9c">DataType::S32</a>:</div>
<div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;        {</div>
<div class="line"><a name="l00604"></a><span class="lineno">  604</span>&#160;            <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(!(<a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">std::is_same&lt;int32_t, D&gt;::value</a>));</div>
<div class="line"><a name="l00605"></a><span class="lineno">  605</span>&#160;            std::uniform_int_distribution&lt;int32_t&gt; distribution_s32(low, high);</div>
<div class="line"><a name="l00606"></a><span class="lineno">  606</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_s32, seed_offset);</div>
<div class="line"><a name="l00607"></a><span class="lineno">  607</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00608"></a><span class="lineno">  608</span>&#160;        }</div>
<div class="line"><a name="l00609"></a><span class="lineno">  609</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a31d65cccd6593e4101db93fb878abcaa">DataType::U64</a>:</div>
<div class="line"><a name="l00610"></a><span class="lineno">  610</span>&#160;        {</div>
<div class="line"><a name="l00611"></a><span class="lineno">  611</span>&#160;            <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(!(<a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">std::is_same&lt;uint64_t, D&gt;::value</a>));</div>
<div class="line"><a name="l00612"></a><span class="lineno">  612</span>&#160;            std::uniform_int_distribution&lt;uint64_t&gt; distribution_u64(low, high);</div>
<div class="line"><a name="l00613"></a><span class="lineno">  613</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_u64, seed_offset);</div>
<div class="line"><a name="l00614"></a><span class="lineno">  614</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00615"></a><span class="lineno">  615</span>&#160;        }</div>
<div class="line"><a name="l00616"></a><span class="lineno">  616</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a115dca124dc6423c7a400b8a8a0270cc">DataType::S64</a>:</div>
<div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160;        {</div>
<div class="line"><a name="l00618"></a><span class="lineno">  618</span>&#160;            <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(!(<a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">std::is_same&lt;int64_t, D&gt;::value</a>));</div>
<div class="line"><a name="l00619"></a><span class="lineno">  619</span>&#160;            std::uniform_int_distribution&lt;int64_t&gt; distribution_s64(low, high);</div>
<div class="line"><a name="l00620"></a><span class="lineno">  620</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_s64, seed_offset);</div>
<div class="line"><a name="l00621"></a><span class="lineno">  621</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00622"></a><span class="lineno">  622</span>&#160;        }</div>
<div class="line"><a name="l00623"></a><span class="lineno">  623</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a56d8353718e6fdc78b8d69078a2cdb94">DataType::F16</a>:</div>
<div class="line"><a name="l00624"></a><span class="lineno">  624</span>&#160;        {</div>
<div class="line"><a name="l00625"></a><span class="lineno">  625</span>&#160;            std::uniform_real_distribution&lt;float&gt; distribution_f16(low, high);</div>
<div class="line"><a name="l00626"></a><span class="lineno">  626</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_f16, seed_offset);</div>
<div class="line"><a name="l00627"></a><span class="lineno">  627</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00628"></a><span class="lineno">  628</span>&#160;        }</div>
<div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">DataType::F32</a>:</div>
<div class="line"><a name="l00630"></a><span class="lineno">  630</span>&#160;        {</div>
<div class="line"><a name="l00631"></a><span class="lineno">  631</span>&#160;            <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(!(<a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">std::is_same&lt;float, D&gt;::value</a>));</div>
<div class="line"><a name="l00632"></a><span class="lineno">  632</span>&#160;            std::uniform_real_distribution&lt;float&gt; distribution_f32(low, high);</div>
<div class="line"><a name="l00633"></a><span class="lineno">  633</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_f32, seed_offset);</div>
<div class="line"><a name="l00634"></a><span class="lineno">  634</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160;        }</div>
<div class="line"><a name="l00636"></a><span class="lineno">  636</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a1ad5f6f3069070ec4cbbdc94d5e61e0e">DataType::F64</a>:</div>
<div class="line"><a name="l00637"></a><span class="lineno">  637</span>&#160;        {</div>
<div class="line"><a name="l00638"></a><span class="lineno">  638</span>&#160;            <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(!(<a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">std::is_same&lt;double, D&gt;::value</a>));</div>
<div class="line"><a name="l00639"></a><span class="lineno">  639</span>&#160;            std::uniform_real_distribution&lt;double&gt; distribution_f64(low, high);</div>
<div class="line"><a name="l00640"></a><span class="lineno">  640</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_f64, seed_offset);</div>
<div class="line"><a name="l00641"></a><span class="lineno">  641</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00642"></a><span class="lineno">  642</span>&#160;        }</div>
<div class="line"><a name="l00643"></a><span class="lineno">  643</span>&#160;        <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6abd7ef6d4f35bc7d05c559b65032f15d1">DataType::SIZET</a>:</div>
<div class="line"><a name="l00644"></a><span class="lineno">  644</span>&#160;        {</div>
<div class="line"><a name="l00645"></a><span class="lineno">  645</span>&#160;            <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(!(<a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">std::is_same&lt;size_t, D&gt;::value</a>));</div>
<div class="line"><a name="l00646"></a><span class="lineno">  646</span>&#160;            std::uniform_int_distribution&lt;size_t&gt; distribution_sizet(low, high);</div>
<div class="line"><a name="l00647"></a><span class="lineno">  647</span>&#160;            <a class="code" href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">fill</a>(tensor, distribution_sizet, seed_offset);</div>
<div class="line"><a name="l00648"></a><span class="lineno">  648</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00649"></a><span class="lineno">  649</span>&#160;        }</div>
<div class="line"><a name="l00650"></a><span class="lineno">  650</span>&#160;        <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l00651"></a><span class="lineno">  651</span>&#160;            <a class="code" href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;NOT SUPPORTED!&quot;</span>);</div>
<div class="line"><a name="l00652"></a><span class="lineno">  652</span>&#160;    }</div>
<div class="line"><a name="l00653"></a><span class="lineno">  653</span>&#160;}</div>
<div class="ttc" id="_error_8h_xhtml_a05b19c75afe9c24200a62b9724734bbd"><div class="ttname"><a href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR(...)</div><div class="ttdoc">Print the given message then throw an std::runtime_error. </div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00031">Error.h:31</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a48d877702a2957f5a932c43a357866f9"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a48d877702a2957f5a932c43a357866f9">arm_compute::DataType::QS16</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1_assets_library_xhtml_a80a7b5ae084bf22b91bc5f68a06711c0"><div class="ttname"><a href="classarm__compute_1_1test_1_1_assets_library.xhtml#a80a7b5ae084bf22b91bc5f68a06711c0">arm_compute::test::AssetsLibrary::fill</a></div><div class="ttdeci">void fill(T &amp;&amp;tensor, D &amp;&amp;distribution, std::random_device::result_type seed_offset) const </div><div class="ttdoc">Fills the specified tensor with random values drawn from distribution. </div><div class="ttdef"><b>Definition:</b> <a href="_assets_library_8h_source.xhtml#l00403">AssetsLibrary.h:403</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543">arm_compute::DataType::QS8</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::Format::U8</a></div><div class="ttdoc">Unknown image format. </div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::Format::F32</a></div><div class="ttdoc">1 channel, 1 F16 per channel </div></div>
<div class="ttc" id="_error_8h_xhtml_a54a6080c9f4df1f908e57a9bbb46f5da"><div class="ttname"><a href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON(cond)</div><div class="ttdoc">If the condition is true then an error message is printed and an exception thrown. </div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00124">Error.h:124</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58aef9ef3ebca4d2b64b6ec83808bafa5f2"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aef9ef3ebca4d2b64b6ec83808bafa5f2">arm_compute::Format::U16</a></div><div class="ttdoc">1 channel, 1 S16 per channel </div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a56d8353718e6fdc78b8d69078a2cdb94"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a56d8353718e6fdc78b8d69078a2cdb94">arm_compute::Format::F16</a></div><div class="ttdoc">1 channel, 1 U32 per channel </div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58aa1e28eee0339658d39a8b4d325b56e9c"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aa1e28eee0339658d39a8b4d325b56e9c">arm_compute::Format::S32</a></div><div class="ttdoc">1 channel, 1 U16 per channel </div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a115dca124dc6423c7a400b8a8a0270cc"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a115dca124dc6423c7a400b8a8a0270cc">arm_compute::DataType::S64</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6abd7ef6d4f35bc7d05c559b65032f15d1"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6abd7ef6d4f35bc7d05c559b65032f15d1">arm_compute::DataType::SIZET</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58ac8bd5bedff8ef192d39a962afc0e19ee"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58ac8bd5bedff8ef192d39a962afc0e19ee">arm_compute::Format::U32</a></div><div class="ttdoc">1 channel, 1 S32 per channel </div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c">arm_compute::Format::S16</a></div><div class="ttdoc">1 channel, 1 U8 per channel </div></div>
<div class="ttc" id="hwc_8hpp_xhtml_a0f61d63b009d0880a89c843bd50d8d76"><div class="ttname"><a href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a></div><div class="ttdeci">void * value</div><div class="ttdef"><b>Definition:</b> <a href="hwc_8hpp_source.xhtml#l00269">hwc.hpp:269</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a1ad5f6f3069070ec4cbbdc94d5e61e0e"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a1ad5f6f3069070ec4cbbdc94d5e61e0e">arm_compute::DataType::F64</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a31d65cccd6593e4101db93fb878abcaa"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a31d65cccd6593e4101db93fb878abcaa">arm_compute::DataType::U64</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6aafb0fced528eaac5fe170b763cda5975"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6aafb0fced528eaac5fe170b763cda5975">arm_compute::DataType::S8</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a024fbe836c85d10afefc81cd2e51658e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> &amp; get </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Provides a contant raw tensor for the specified image. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td><a class="el" href="struct_image.xhtml" title="Structure to hold Image information. ">Image</a> file used to look up the raw tensor. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_assets_library_8cpp_source.xhtml#l00400">400</a> of file <a class="el" href="_assets_library_8cpp_source.xhtml">AssetsLibrary.cpp</a>.</p>

<p>References <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0">arm_compute::RGB888</a>.</p>
<div class="fragment"><div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;{</div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;    <span class="keywordflow">return</span> find_or_create_raw_tensor(name, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0">Format::RGB888</a>);</div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;}</div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0">arm_compute::Format::RGB888</a></div><div class="ttdoc">2 channel, 1 U8 per channel </div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aa0cf1a79542c521b9f16d117b085c4d5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> get </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Provides a raw tensor for the specified image. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td><a class="el" href="struct_image.xhtml" title="Structure to hold Image information. ">Image</a> file used to look up the raw tensor. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_assets_library_8cpp_source.xhtml#l00405">405</a> of file <a class="el" href="_assets_library_8cpp_source.xhtml">AssetsLibrary.cpp</a>.</p>

<p>References <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0">arm_compute::RGB888</a>.</p>
<div class="fragment"><div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;{</div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;    <span class="keywordflow">return</span> RawTensor(find_or_create_raw_tensor(name, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0">Format::RGB888</a>));</div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;}</div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0">arm_compute::Format::RGB888</a></div><div class="ttdoc">2 channel, 1 U8 per channel </div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a3675bd0074fa527b42c6516a37f8f232"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> get </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
          <td class="paramname"><em>data_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>num_channels</em> = <code>1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates an uninitialised raw tensor with the given <code>data_type</code> and <code>num_channels</code>. </p>
<p>The shape is derived from the specified image.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td><a class="el" href="struct_image.xhtml" title="Structure to hold Image information. ">Image</a> file used to initialise the tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">data_type</td><td>Data type used to initialise the tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num_channels</td><td>Number of channels used to initialise the tensor. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_assets_library_8cpp_source.xhtml#l00410">410</a> of file <a class="el" href="_assets_library_8cpp_source.xhtml">AssetsLibrary.cpp</a>.</p>

<p>References <a class="el" href="_c_l_2_min_max_location_8cpp_source.xhtml#l00090">arm_compute::test::validation::data_type</a>, and <a class="el" href="_simple_tensor_8h_source.xhtml#l00234">SimpleTensor&lt; T &gt;::shape()</a>.</p>
<div class="fragment"><div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;{</div>
<div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;    <span class="keyword">const</span> RawTensor &amp;raw = <span class="keyword">get</span>(name);</div>
<div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;</div>
<div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;    <span class="keywordflow">return</span> RawTensor(raw.shape(), <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2ad7f431e3446fddcd9b6b9f93c4c14">data_type</a>, num_channels);</div>
<div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;}</div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ac2ad7f431e3446fddcd9b6b9f93c4c14"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2ad7f431e3446fddcd9b6b9f93c4c14">arm_compute::test::validation::data_type</a></div><div class="ttdeci">data_type</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_min_max_location_8cpp_source.xhtml#l00090">MinMaxLocation.cpp:90</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a0e77935822447adc6cdce586f276f97d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> &amp; get </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58">Format</a>&#160;</td>
          <td class="paramname"><em>format</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Provides a contant raw tensor for the specified image after it has been converted to <code>format</code>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td><a class="el" href="struct_image.xhtml" title="Structure to hold Image information. ">Image</a> file used to look up the raw tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>Format used to look up the raw tensor. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_assets_library_8cpp_source.xhtml#l00417">417</a> of file <a class="el" href="_assets_library_8cpp_source.xhtml">AssetsLibrary.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;{</div>
<div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;    <span class="keywordflow">return</span> find_or_create_raw_tensor(name, format);</div>
<div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab760ccaa18b95b99c73eb0e763f39ec2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> get </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58">Format</a>&#160;</td>
          <td class="paramname"><em>format</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Provides a raw tensor for the specified image after it has been converted to <code>format</code>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td><a class="el" href="struct_image.xhtml" title="Structure to hold Image information. ">Image</a> file used to look up the raw tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>Format used to look up the raw tensor. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_assets_library_8cpp_source.xhtml#l00422">422</a> of file <a class="el" href="_assets_library_8cpp_source.xhtml">AssetsLibrary.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;{</div>
<div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;    <span class="keywordflow">return</span> RawTensor(find_or_create_raw_tensor(name, format));</div>
<div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a11f5f1baaad31d1067564eccf599e90c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> &amp; get </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455a">Channel</a>&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Provides a contant raw tensor for the specified channel after it has been extracted form the given image. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td><a class="el" href="struct_image.xhtml" title="Structure to hold Image information. ">Image</a> file used to look up the raw tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">channel</td><td>Channel used to look up the raw tensor.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The channel has to be unambiguous so that the format can be inferred automatically. </dd></dl>

<p>Definition at line <a class="el" href="_assets_library_8cpp_source.xhtml#l00427">427</a> of file <a class="el" href="_assets_library_8cpp_source.xhtml">AssetsLibrary.cpp</a>.</p>

<p>References <a class="el" href="tests_2_utils_8h_source.xhtml#l00119">arm_compute::test::get_format_for_channel()</a>.</p>
<div class="fragment"><div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;{</div>
<div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">get</span>(name, <a class="code" href="namespacearm__compute_1_1test.xhtml#aa337ab76176f3c4193642ac6de3a61cf">get_format_for_channel</a>(channel), channel);</div>
<div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;}</div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_aa337ab76176f3c4193642ac6de3a61cf"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#aa337ab76176f3c4193642ac6de3a61cf">arm_compute::test::get_format_for_channel</a></div><div class="ttdeci">Format get_format_for_channel(Channel channel)</div><div class="ttdoc">Look up the format corresponding to a channel. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00119">Utils.h:119</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af6f0ca724e534653925306023dbb88e7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> get </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455a">Channel</a>&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Provides a raw tensor for the specified channel after it has been extracted form the given image. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td><a class="el" href="struct_image.xhtml" title="Structure to hold Image information. ">Image</a> file used to look up the raw tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">channel</td><td>Channel used to look up the raw tensor.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The channel has to be unambiguous so that the format can be inferred automatically. </dd></dl>

<p>Definition at line <a class="el" href="_assets_library_8cpp_source.xhtml#l00432">432</a> of file <a class="el" href="_assets_library_8cpp_source.xhtml">AssetsLibrary.cpp</a>.</p>

<p>References <a class="el" href="tests_2_utils_8h_source.xhtml#l00119">arm_compute::test::get_format_for_channel()</a>.</p>
<div class="fragment"><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;{</div>
<div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;    <span class="keywordflow">return</span> RawTensor(<span class="keyword">get</span>(name, <a class="code" href="namespacearm__compute_1_1test.xhtml#aa337ab76176f3c4193642ac6de3a61cf">get_format_for_channel</a>(channel), channel));</div>
<div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;}</div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_aa337ab76176f3c4193642ac6de3a61cf"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#aa337ab76176f3c4193642ac6de3a61cf">arm_compute::test::get_format_for_channel</a></div><div class="ttdeci">Format get_format_for_channel(Channel channel)</div><div class="ttdoc">Look up the format corresponding to a channel. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00119">Utils.h:119</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a8c511f7046a704b8352ea8a8bbf456fa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> &amp; get </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58">Format</a>&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455a">Channel</a>&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Provides a constant raw tensor for the specified channel after it has been extracted form the given image formatted to <code>format</code>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td><a class="el" href="struct_image.xhtml" title="Structure to hold Image information. ">Image</a> file used to look up the raw tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>Format used to look up the raw tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">channel</td><td>Channel used to look up the raw tensor. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_assets_library_8cpp_source.xhtml#l00437">437</a> of file <a class="el" href="_assets_library_8cpp_source.xhtml">AssetsLibrary.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;{</div>
<div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;    <span class="keywordflow">return</span> find_or_create_raw_tensor(name, format, channel);</div>
<div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ad6182f07b3eda32931598aa4f2bfc11a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> get </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58">Format</a>&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455a">Channel</a>&#160;</td>
          <td class="paramname"><em>channel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Provides a raw tensor for the specified channel after it has been extracted form the given image formatted to <code>format</code>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td><a class="el" href="struct_image.xhtml" title="Structure to hold Image information. ">Image</a> file used to look up the raw tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>Format used to look up the raw tensor. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">channel</td><td>Channel used to look up the raw tensor. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_assets_library_8cpp_source.xhtml#l00442">442</a> of file <a class="el" href="_assets_library_8cpp_source.xhtml">AssetsLibrary.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;{</div>
<div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;    <span class="keywordflow">return</span> RawTensor(find_or_create_raw_tensor(name, format, channel));</div>
<div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="acc474b96886b5fd500460c7b25dc84fa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> get_image_shape </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Provides a tensor shape for the specified image. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td><a class="el" href="struct_image.xhtml" title="Structure to hold Image information. ">Image</a> file used to look up the raw tensor. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_assets_library_8cpp_source.xhtml#l00395">395</a> of file <a class="el" href="_assets_library_8cpp_source.xhtml">AssetsLibrary.cpp</a>.</p>

<p>References <a class="el" href="_simple_tensor_8h_source.xhtml#l00234">SimpleTensor&lt; T &gt;::shape()</a>.</p>
<div class="fragment"><div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;{</div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;    <span class="keywordflow">return</span> load_image(name).<a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#aba5871b3e4a65d057ec1c28fce8b00ba">shape</a>();</div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;}</div>
<div class="ttc" id="classarm__compute_1_1test_1_1_simple_tensor_xhtml_aba5871b3e4a65d057ec1c28fce8b00ba"><div class="ttname"><a href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#aba5871b3e4a65d057ec1c28fce8b00ba">arm_compute::test::SimpleTensor::shape</a></div><div class="ttdeci">TensorShape shape() const override</div><div class="ttdoc">Shape of the tensor. </div><div class="ttdef"><b>Definition:</b> <a href="_simple_tensor_8h_source.xhtml#l00234">SimpleTensor.h:234</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a9b67b266207227062c7a2961ef85293a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string path </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Path to assets directory used to initialise library. </p>

<p>Definition at line <a class="el" href="_assets_library_8cpp_source.xhtml#l00194">194</a> of file <a class="el" href="_assets_library_8cpp_source.xhtml">AssetsLibrary.cpp</a>.</p>

<p>Referenced by <a class="el" href="_assets_library_8h_source.xhtml#l00656">AssetsLibrary::fill_layer_data()</a>.</p>
<div class="fragment"><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;{</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    <span class="keywordflow">return</span> _library_path;</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a4035a1140831801ced5dfa1d9fe6988a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::random_device::result_type seed </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Seed that is used to fill tensors with random values. </p>

<p>Definition at line <a class="el" href="_assets_library_8cpp_source.xhtml#l00199">199</a> of file <a class="el" href="_assets_library_8cpp_source.xhtml">AssetsLibrary.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;{</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    <span class="keywordflow">return</span> _seed;</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>tests/<a class="el" href="_assets_library_8h_source.xhtml">AssetsLibrary.h</a></li>
<li>tests/<a class="el" href="_assets_library_8cpp_source.xhtml">AssetsLibrary.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1test.xhtml">test</a></li><li class="navelem"><a class="el" href="classarm__compute_1_1test_1_1_assets_library.xhtml">AssetsLibrary</a></li>
    <li class="footer">Generated on Thu Oct 12 2017 14:26:38 for Compute Library by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
